
		function jsGetAge(d1,d2,d3){         
    var returnAge;  
//  var strBirthdayArr=strBirthday.split("-");  
//  var birthYear = strBirthdayArr[0];  //1995
//  var birthMonth = strBirthdayArr[1];  //10
//  var birthDay = strBirthdayArr[2];  	//22
    
     var birthYear = d1;  //1995
    var birthMonth = d2;  //10
    var birthDay = d3;  	//22
      
      
    d = new Date();  
    var nowYear = d.getFullYear();  //		 2017
    var nowMonth = d.getMonth() + 1;  //本月   9+1
    var nowDay = d.getDate();     //日期  	 6
     var nowHour=d.getHours();
    var result=[];
    var allMonth,allWeek,allDay,allHour,allMinute;
    //同年的计算方法
    function sum(returnAge,allMonth,allWeek,allDay,allHour,allMinute){
    		
    		
        	result[0]=returnAge;
        	result[1]=allMonth;
        	result[2]=allWeek;
        	result[3]=allDay;
        	result[4]=allHour;
        	result[5]=allMinute;
        	
        
    }
    
    function sum2(returnAge,allMonth){
    		allWeek=allMonth*4;
        	allDay=allWeek*7;
        	allHour=allDay*24;
        	allMinute=allHour*60;
    		result[0]=returnAge;
        	result[1]=allMonth;
        	result[2]=allWeek;
        	result[3]=allDay;
        	result[4]=allHour;
        	result[5]=allMinute;
    }
    if(nowYear == birthYear){  
        returnAge = 0;//同年 则为0岁  
        if(birthMonth<nowMonth){
        	allMonth=nowMonth-birthMonth;
        	allWeek=allMonth*4;
        	allDay=allWeek*7;
        	allHour=allDay*24;
        	allMinute=allHour*60;
        	
        	sum(returnAge,allMonth,allWeek,allDay,allHour,allMinute);
        	console.log('??');
        }else if(birthMonth==nowMonth&&birthDay!=nowDay){
        	allMonth=0;
        	returnAge=0;
        	 allDay=nowDay-birthDay;
        	 allWeek=Math.floor(allDay/7);
        	 allHour=allDay*24;
        	 allMinute=allHour*60;
        	 
        	 sum(returnAge,allMonth,allWeek,allDay,allHour,allMinute);
        	
        }else if(birthMonth==nowMonth&&birthDay==nowDay){
        	allMonth=0;
        	returnAge=0;
        	allDay=0;
        	allWeek=0;
        	allHour=nowHour;
        	allMinute=nowHour*60;
        	sum(returnAge,allMonth,allWeek,allDay,allHour,allMinute);
        	
        }
    }  
    else{  
        var ageDiff = nowYear - birthYear ; //年之差  2017-1995=22
        if(ageDiff > 0){  
            if(nowMonth == birthMonth) { //10 = 10
                var dayDiff = nowDay - birthDay;//日之差  6-22=-16
                if(dayDiff < 0)  //同月没过生日就减
                {  
                    returnAge = ageDiff - 1;  
                    
                    allMonth=returnAge*12+birthMonth;
                    allWeek=allMonth*4+Math.floor(dayDiff/7);
                    allDay=allMonth*30+nowDay;
                    allHour=allDay+nowHour;
                    allMinute=allHour*60;
                   sum(returnAge,allMonth,allWeek,allDay,allHour,allMinute);
        	 }  
                else  //过了就不减
                {  
                    returnAge = ageDiff ;  
                    
                    allMonth=returnAge*12+birthMonth;
                    allWeek=allMonth*4+Math.floor(dayDiff/7);
                    allDay=allMonth*30+nowDay;
                    allHour=allDay+nowHour;
                    allMinute=allHour*60;
                   sum(returnAge,allMonth,allWeek,allDay,allHour,allMinute);
                }  
            }  
            else  
            {  
                var monthDiff = nowMonth - birthMonth;//月之差  10-7=2
                 var dayDiff = nowDay - birthDay;
                if(monthDiff < 0)  
                {  
                    returnAge = ageDiff - 1;  
                    
                   allMonth=returnAge*12+nowMonth;
                   allWeek=allMonth*4+Math.floor(dayDiff/7);
                   allDay=allMonth*30+nowDay;
                   allHour=allDay+nowHour;
                   allMinute=allHour*60;
                   sum(returnAge,allMonth,allWeek,allDay,allHour,allMinute);
                    
                    
                    
                }  
                else  
                {  
                    returnAge = ageDiff ;  //22
                    
                   allMonth=returnAge*12+nowMonth;
                   allWeek=allMonth*4+Math.floor(dayDiff/7);
                   allDay=allMonth*30+nowDay;
                   allHour=allDay+nowHour;
                   allMinute=allHour*60;
                   sum(returnAge,allMonth,allWeek,allDay,allHour,allMinute);
                    
                }  
            }  
        }  
        else  
        {  
            returnAge = -1;//返回-1 表示出生日期输入错误 晚于今天  
        }  
    }  
      //需要返回6种形式的年龄，年，月，周，日，小时，分钟，
      	Se= nowHour*3600+nowDay*24*3600+(nowMonth-1)*30*24*3600;
     
        	result[6]=Se;
//  return returnAge;//返回周岁年龄  
				return result;
      
}  